<template>
    <div >
        <el-table :data="tableData" border style="width: 100%" class="home">
            <el-table-column prop="username" label="登入账号" width="180">
            </el-table-column>
            <el-table-column prop="lastLogin.ip" label="上次登入ip" width="180">
            </el-table-column>
            <el-table-column prop="lastLogin.loginTime" label="上次登入时间">
            </el-table-column>
            <el-table-column prop="nowLogin.ip" label="本次登入ip">
            </el-table-column>
            <el-table-column prop="nowLogin.loginTime" label="本次登入时间">
            </el-table-column>
        </el-table>
    </div>
</template>
<script>
import *as api from "@/api/stu"    
export default { 
    meta: {
        title: "glsy",
        icon: "iconfont icon-shouye1",
    },
    data() {
        return {
            tableData: []
        }
    },
    created(){
        this.log()
    },
    methods:{
        log(){
            api.logs()
            .then(res=>{
                // console.log(res)
                if(res.data.state){
                   this.tableData=res.data.data; 
                }
            })
        }
    }
}
</script>
<style scoped>
.home{
    text-align: center;
    color: #000;
}

</style>
